//package org.example;
//
//import org.example.entity.CustomerInfo;
//import org.example.entity.CustomerOrder;
//import org.example.entity.CustomerRepayPlan;
//import org.example.generator.DataGenerator;
//
//import java.time.LocalDate;
//import java.util.List;
//
///**
// * 数据生成器测试类
// */
//public class TestDataGenerator {
//    public static void main(String[] args) {
//        System.out.println("=== 测试数据生成器 ===");
//
//        // 测试生成用户信息
//        System.out.println("\n1. 测试生成用户信息:");
//        LocalDate testDate = LocalDate.of(2023, 8, 15);
//        CustomerInfo customer = DataGenerator.generateCustomerInfo(testDate);
//        System.out.println("姓名: " + customer.getPlName());
//        System.out.println("手机号: " + customer.getPlPhone());
//        System.out.println("身份证号: " + customer.getPlIdNo());
//        System.out.println("城市: " + customer.getSaleCityName());
//        System.out.println("性别: " + customer.getGender());
//        System.out.println("年龄: " + customer.getAge());
//        System.out.println("学历: " + customer.getEducation());
//        System.out.println("职业: " + customer.getOccupation());
//        System.out.println("来源: " + customer.getSource());
//        System.out.println("创建时间: " + customer.getCreatedTime());
//
//        // 测试生成客户订单
//        System.out.println("\n2. 测试生成客户订单:");
//        LocalDate loanDate = LocalDate.of(2023, 8, 15);
//        CustomerOrder order = DataGenerator.generateCustomerOrder(customer, loanDate, "盈峰小贷");
//        System.out.println("订单号: " + order.getOrderNo());
//        System.out.println("放款时间: " + order.getFrTime());
//        System.out.println("贷款期限: " + order.getLoanTerm());
//        System.out.println("对客利率: " + order.getProductRate());
//        System.out.println("贷款金额: " + order.getLoanAmount());
//        System.out.println("还款方式: " + order.getRepayType());
//        System.out.println("状态: " + order.getStatus());
//
//        // 测试生成还款计划
//        System.out.println("\n3. 测试生成还款计划:");
//        List<CustomerRepayPlan> plans = DataGenerator.generateRepayPlan(order);
//        System.out.println("还款计划期数: " + plans.size());
//
//        for (int i = 0; i < Math.min(3, plans.size()); i++) {
//            CustomerRepayPlan plan = plans.get(i);
//            System.out.println("第" + plan.getBillTenor() + "期:");
//            System.out.println("  应还款日期: " + plan.getDueDate());
//            System.out.println("  应还本金: " + plan.getNowPayPrincipal());
//            System.out.println("  应还利息: " + plan.getNowPayInterest());
//            System.out.println("  应还总额: " + plan.getNowPayAmount());
//            System.out.println("  还款状态: " + plan.getRepayStatus());
//            if (plan.getActualRepayDate() != null) {
//                System.out.println("  实际还款日期: " + plan.getActualRepayDate());
//                System.out.println("  实际还款金额: " + plan.getActualRepayMoney());
//            }
//        }
//
//        System.out.println("\n=== 测试完成 ===");
//    }
//}
